<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style type="text/css">
			div{
				width: 200px;
				height: 200px;
				background-color: yellow;
			}
		</style>
		<script src="js/jquery-3.7.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function (){
				$("button").eq(0).click(function (){
					$("div").fadeOut(5000,function (){
						console.log("div已经淡出")
					})
				})
				$("button").eq(1).click(function (){
					$("div").fadeIn(5000,function (){
						console.log("div已经淡入")
					})
				})
				$("button").eq(2).click(function (){
					$("div").fadeTo(5000,0.1,function (){
						console.log("div透明度为0.1")
					})
				})
			})
			
		</script>
	</head>
	<body>
		<button>淡出</button>
		<button>淡入</button>
		<button>淡入淡出</button>
		<div></div>
	</body>
</html>
